package net.mikoo.seals.biz.mapper;

import java.util.List;

import org.mybatis.spring.annotation.MapperScan;

import net.mikoo.seals.model.Workflow;
import net.mikoo.seals.model.WorkflowQuery;
import net.mikoo.seals.model.WorkflowSetting;

@MapperScan
public interface WorkflowMapper {
	
	Integer insert(Workflow workflow);
	
	Integer update(Workflow workflow);
	
	Workflow selectInfoById(Long workflowId);
	
	List<Workflow> selectByQueryToPage(WorkflowQuery query);
	
	Integer countByQueryToPage(WorkflowQuery query);
	
	Workflow selectInfoByQuery(WorkflowQuery query);
	
	Integer delete(Workflow workflow);
	
	List<Workflow> selectListByQuery(WorkflowQuery query);

	Integer countUsedTotalById(Long workflowId);
	
	Integer insertSetting(WorkflowSetting setting);

	Integer deleteSettingByWorkflowId(Long workflowId);

	List<WorkflowSetting> selectSettingsByWorkflowId(Long workflowId);
	
}